import Mock from 'mockjs'
// config: {url: "/api/login", method: "post", data: "{\"username\":\"admin\",\"password\":\"111111\"}", headers: {…}, params: null, …}
// data: {resp_data: {…}}
// headers: {}
// request: MockXMLHttpRequest {custom: {…}, match: true, readyState: 4, timeout: 0, onreadystatechange: ƒ, …}
// status: 200
// statusText: "OK"
Mock.mock(/api\/login/, 'post', (info: any) => {
    const body = JSON.parse(info.body)
    if (body.username === 'admin') {
        return {
            data: {
                resp_data: {
                    token: '123456'
                }
            }
        }
    } else {
        
    }
})